package com.ubs.persistence.entity;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the account_service_xref database table.
 * 
 */
@Embeddable
public class AccountServicePK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	@Column(name="account_id")
	private int accountId;

	@Column(name="service_id")
	private int serviceId;

    public AccountServicePK() {
    }
	public int getAccountId() {
		return this.accountId;
	}
	public void setAccountId(int accountId) {
		this.accountId = accountId;
	}
	public int getServiceId() {
		return this.serviceId;
	}
	public void setServiceId(int serviceId) {
		this.serviceId = serviceId;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof AccountServicePK)) {
			return false;
		}
		AccountServicePK castOther = (AccountServicePK)other;
		return 
			(this.accountId == castOther.accountId)
			&& (this.serviceId == castOther.serviceId);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.accountId;
		hash = hash * prime + this.serviceId;
		
		return hash;
    }
}